package com.ruoyi.common.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * @Created IntelliJ IDEA.
 * @author: ace
 * @Date: 2022/10/12
 * @Time: 14:32
 * @Description: 多租户Tree基类
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class TenantTreeEntity<T> extends TenantEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 父菜单名称
     */
    @TableField(exist = false)
    private String parentName;

    /**
     * 父菜单ID
     */
    private Long parentId;

    /**
     * 子部门
     */
    @TableField(exist = false)
    private List<T> children = new ArrayList<>();
}
